package com.training.java.core.collections.laptop.post15;

import java.util.ArrayList;
import java.util.List;

import com.training.java.core.pre15.LaptopImmutable;

public class LaptopImmutableDemo {

	public static void main(String[] args) {
		LaptopImmutable laptop1 = new LaptopImmutable("hp", "a200", "windows7");

		LaptopImmutable laptop2 = new LaptopImmutable("sony", "b2000",
				"windows8");

		LaptopImmutable laptop3 = new LaptopImmutable("hp", "ac333",
				"windows xp");

		List<LaptopImmutable> laptops = new ArrayList<LaptopImmutable>();

		laptops.add(laptop1);
		laptops.add(laptop2);
		laptops.add(laptop3);

		for (LaptopImmutable aLaptopImmutable : laptops) {

			System.out.println("Start printing LaptopMutable details *******");

			System.out.println("Company = " + aLaptopImmutable.getCompany());
			System.out.println("Model = " + aLaptopImmutable.getModel());
			System.out.println("Operating System = "
					+ aLaptopImmutable.getOperatingSystem());

			System.out.println("End printing LaptopMutable details *******");
		}

	}

}
